{extend name='extra@admin/content'}

{block name="button"}

{/block}

{block name="content"}

<!-- 表单搜索 开始 -->
<form class="layui-form layui-form-pane form-search" action="__SELF__" onsubmit="return false" method="get">
    <div class="layui-form-item layui-inline">
        <label class="layui-form-label">会员列表</label>
        <div class="layui-input-inline">
            <input name="realname" value="{$Think.get.realname|default=''}" placeholder="请输入会员姓名" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-inline">
        <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
    </div>
</form>
<!-- 表单搜索 结束 -->

<form onsubmit="return false;" data-auto="true" method="post">
    {if empty($list)}
    <p class="help-block text-center well">暂 无 信 息！</p>
    {else}

     <table class="layui-table" lay-skin="line" lay-size="sm">
        <thead>
            <tr>
                <th class='list-table-check-td'>
                    <input data-none-auto="" data-check-target='.list-check-box' type='checkbox'/>
                </th>
                <th class='text-left nowrap'>姓名</th>
                <th class='text-left nowrap'>手机号码</th>
                <th class='text-left nowrap'>会员卡号</th>
                <th class='text-left nowrap'>会员等级</th>
                <th class='text-left nowrap'>生日</th>
                <th class='text-left nowrap'>操作</th>
            </tr>
        </thead>
        <tbody>
            {foreach $list as $key=>$vo}
            <tr>
                <td class='list-table-check-td'>
                    <input class="list-check-box" value='{$vo.uid}' type='checkbox'/>
                </td>
                 <td class='text-left nowrap'>
                    {$vo.realname}
                </td>
                <td class='text-left nowrap'>
                    {$vo.mobile}
                </td>
                <td class='text-left nowrap'>
                    {$vo.pay_code}
                </td>
                <td class='text-left nowrap'>
                    {if condition="$vo.level_id eq 1"}
                        普通会员
                    {elseif condition="$vo.level_id eq 2"}
                        黄金会员
                    {elseif condition="$vo.level_id eq 3" /}
                        铂金会员
                    {elseif condition="$vo.level_id eq 4" /}
                        钻石会员
                    {/if}
                </td>
                <td class='text-left nowrap'>
                    {$vo.birthday_year}-{$vo.birthday_month}-{$vo.birthday_day}
                </td>
                <td class='text-left nowrap'>
                    {if $vo.is_birth eq 0}
                    <span class="text-explode">|</span>
                    <a data-update="{$vo.uid}" data-field='is_birth' data-value='0' data-action='{:url("$classuri/set_birth")}' href="javascript:void(0)">发放蛋糕</a>
                    {else /}
                    <span class="text-explode">|</span>
                    <a data-field='is_birth' data-value='0'  href="javascript:void(0)">已发放</a>
                    {/if}
                </td>
            </tr>
            {/foreach}
        </tbody>
    </table>

    {if isset($page)}<p>{$page}</p>{/if}
    {/if}
    <script>

    </script>
</form>
{/block}